package spring.in.action.chapter_02;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class CDPlayer
{
    // @Autowired(required = false)
    @Autowired
    ICD fIcd = null;

    List<ICD> icds;

    public CDPlayer()
    {
    }

    public CDPlayer(ICD pIcd)
    {
        this.fIcd = pIcd;
    }

    public CDPlayer(List<ICD> pIcds)
    {
        super();
        this.icds = pIcds;
    }

    public void play()
    {
        fIcd.play();
    }

    public ICD getIcd()
    {
        return this.fIcd;
    }

    public void setIcd(ICD pIcd)
    {
        this.fIcd = pIcd;
    }
}
